/*
 * @Author: 刘鑫
 * @Date: 2020-11-18 19:50:22
 * @LastEditors: 刘鑫
 * @LastEditTime: 2020-11-20 15:55:50
 * @Description:
 */

import { request } from 'umi';
import { IBrand, IComment } from '@/utils/types';
export let getHomeData = () => {
  return request('/', {
    method: 'Get',
  });
};
//厂家详情
export let getBrandDetail = (id: string) => {
  return request('/brand/detail', {
    method: 'Get',
    params: { id },
  });
};
//制造商Id获取商品
export let getBrandDetailList = (data: IBrand) => {
  return request('/goods/list', {
    method: 'Get',
    data,
  });
};
//专题详情
export let getTopicDetail = (id: string) => {
  return request('/topic/detail', {
    method: 'Get',
    params: { id },
  });
};
//评论
export let getComment = (config: IComment) => {
  return request('/comment/list', {
    method: 'Get',
    params: { ...config },
  });
};
